import { post, get } from '../util/request';
// 获取用户详情
export const reqUserDetail = (uid) => get(`/user/detail?uid=${uid}`);
// 获取账号信息
export const reqUserCcount = () => get(`/user/account`);
// 获取用户信息 , 歌单，收藏，mv, dj 数量
export const reqUserSubcount = () => get(`/user/subcount`);
// 获取用户等级信息
export const reqUserLevel = () => get(`/user/level`);
// 获取用户绑定信息
export const reqUserBinding = (uid) => get(`/user/binding?uid=${uid}`);


// 获取用户绑定手机
// phone: 手机号码
// oldcaptcha: 原手机号码的验证码
// captcha: 新手机号码的验证码
export const reqUserReplacephone = (phone, oldcaptcha, captcha) => get(`/user/replacephone?phone=${phone}&captcha=${captcha}&oldcaptcha=${oldcaptcha}`);


//更新用户信息
/*
gender: 性别 0:保密 1:男性 2:女性

birthday: 出生日期,时间戳 unix timestamp

nickname: 用户昵称

province: 省份id

city: 城市id

signature：用户签名
 */
export const reqUserUpdate = (gender, birthday, nickname, province, city, signature) => get(`/user/update?gender=${gender}&signature=${signature}&city=${city}&nickname=${nickname}&birthday=${birthday}&province=${province}`);


// 更新头像
// imgSize: 图片尺寸, 默认为 300
export const reqUserUpload = (imgSize) => get(`/avatar/upload?imgSize=${imgSize}`);


// 设置  可获取用户设置
export const reqUserSet = () => get(`/setting`);